package com.cyzy.pojo;


import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;

import java.util.List;

@TableName(value = "coupon", autoResultMap = true)  // 指定表名并启用自动结果映射
public class Coupon {

  @TableId(type = IdType.AUTO)  // 指定自增主键
  private long templateId;
  private long couponType;
  private String couponName;
  private long discountRate;
  private long maxDiscount;
  private long minAmount;
  private long deductAmount;
  @TableField(typeHandler = JacksonTypeHandler.class)  // 使用Jackson处理JSON
  private List<String> applicableIds;
  private String conditionDesc;
  private long totalCount;
  private long remainingCount;
  private long validDays;
  private java.sql.Timestamp createTime;
  private java.sql.Timestamp updateTime;
  private long status;
  private long applicableScope;


  public long getTemplateId() {
    return templateId;
  }

  public void setTemplateId(long templateId) {
    this.templateId = templateId;
  }


  public long getCouponType() {
    return couponType;
  }

  public void setCouponType(long couponType) {
    this.couponType = couponType;
  }


  public String getCouponName() {
    return couponName;
  }

  public void setCouponName(String couponName) {
    this.couponName = couponName;
  }


  public long getDiscountRate() {
    return discountRate;
  }

  public void setDiscountRate(long discountRate) {
    this.discountRate = discountRate;
  }


  public long getMaxDiscount() {
    return maxDiscount;
  }

  public void setMaxDiscount(long maxDiscount) {
    this.maxDiscount = maxDiscount;
  }


  public long getMinAmount() {
    return minAmount;
  }

  public void setMinAmount(long minAmount) {
    this.minAmount = minAmount;
  }


  public long getDeductAmount() {
    return deductAmount;
  }

  public void setDeductAmount(long deductAmount) {
    this.deductAmount = deductAmount;
  }


  public List<String> getApplicableIds() {
    return applicableIds;
  }

  public void setApplicableIds(List<String> applicableIds) {
    this.applicableIds = applicableIds;
  }

  public String getConditionDesc() {
    return conditionDesc;
  }

  public void setConditionDesc(String conditionDesc) {
    this.conditionDesc = conditionDesc;
  }


  public long getTotalCount() {
    return totalCount;
  }

  public void setTotalCount(long totalCount) {
    this.totalCount = totalCount;
  }


  public long getRemainingCount() {
    return remainingCount;
  }

  public void setRemainingCount(long remainingCount) {
    this.remainingCount = remainingCount;
  }


  public long getValidDays() {
    return validDays;
  }

  public void setValidDays(long validDays) {
    this.validDays = validDays;
  }


  public java.sql.Timestamp getCreateTime() {
    return createTime;
  }

  public void setCreateTime(java.sql.Timestamp createTime) {
    this.createTime = createTime;
  }


  public java.sql.Timestamp getUpdateTime() {
    return updateTime;
  }

  public void setUpdateTime(java.sql.Timestamp updateTime) {
    this.updateTime = updateTime;
  }


  public long getStatus() {
    return status;
  }

  public void setStatus(long status) {
    this.status = status;
  }


  public long getApplicableScope() {
    return applicableScope;
  }

  public void setApplicableScope(long applicableScope) {
    this.applicableScope = applicableScope;
  }

  @Override
  public String toString() {
    return "Coupon{" +
            "templateId=" + templateId +
            ", couponType=" + couponType +
            ", couponName='" + couponName + '\'' +
            ", discountRate=" + discountRate +
            ", maxDiscount=" + maxDiscount +
            ", minAmount=" + minAmount +
            ", deductAmount=" + deductAmount +
            ", applicableIds=" + applicableIds +
            ", conditionDesc='" + conditionDesc + '\'' +
            ", totalCount=" + totalCount +
            ", remainingCount=" + remainingCount +
            ", validDays=" + validDays +
            ", createTime=" + createTime +
            ", updateTime=" + updateTime +
            ", status=" + status +
            ", applicableScope=" + applicableScope +
            '}';
  }
}
